import request from '@/utils/request'

export function orderInsert(data) {
  return request({
    url: 'order/externalChannels/orderInsert',
    method: 'post',
    data,
  })
}
export function orderList(params) {
  return request({
    url: 'order/externalChannels/orderList',
    params,
  })
}
export function checkoutList(params) {
  return request({
    url: 'order/externalChannels/checkout/list',
    params,
  })
}
export function checkoutDetails(id) {
  return request({
    url: `order/externalChannels/checkoutDetails/${ id }`,
    
  })
}
export function outCheckout(data) {
  return request({
    url: 'order/externalChannels/outCheckout',
    method: 'put',
    data,
  })
}
export function revokeOut(data) {
  return request({
    url: 'order/externalChannels/revokeOut',
    method: 'put',
    data,
  })
}
export function submittedOverseasWarehouse(data) {
  return request({
    url: 'order/externalChannels/submittedOverseasWarehouse',
    method: 'put',
    data,
  })
}
export function domesticCustomsDeclaration(data) {
  return request({
    url: 'order/externalChannels/domesticCustomsDeclaration',
    method: 'put',
    data,
  })
}
export function importOrder(deptId, dataSource, data) {
  return request({
    url: `order/externalChannels/importOrder/${ deptId }/${ dataSource }`,
    method: 'post',
    data,
  })
} 

// 强制制单

export function externalCompelPrint(orderNos) {
  return request({
    url: `order/externalChannels/externalCompelPrint/${ orderNos }`,
    method: 'delete',
    
  })
}
export function editOrder(data) {
  return request({
    url: 'order/externalChannels/editOrder',
    method: 'PUT',
    data,
  })
}